<#include "/layout/layout.ftl">
<@layout title="主页" active="home">

<#assign css>
<style>

</style>
</#assign>
<#assign js>

<!-- SparkLine -->
<script src="/assets/vendor/jquery-sparkline/jquery.sparkline.min.js"></script>
<!-- jVectorMap -->
<script src="/assets/vendor/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="/assets/vendor/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="/assets/vendor/chart.js/Chart.min.js"></script>
<script src="/assets/js/dashboard.js"></script>
    <script src="/assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
    <script type="text/javascript" src="/assets/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"
            charset="UTF-8"></script>
    <script>
        //tableId,queryId,conditionContainer
        //var userTable;
        $(function () {
            //Date picker
            $('#datepicker').datepicker({
                autoclose: true,
                format: "yyyy-mm-dd",
                todayHighlight: true,
                language: "zh-CN"
            });
            $('#datepicker-end').datepicker({
                autoclose: true,
                format: "yyyy-mm-dd",
                todayHighlight: true,
                language: "zh-CN"
            });
            $('#datepicker').unbind("change");
            $('#datepicker').change(function () {
                $('#datepicker-end').datepicker('setStartDate', $("#datepicker").val());
            });
            $('#datepicker-end').unbind("change");
            $('#datepicker-end').change(function () {
                $('#datepicker').datepicker('setEndDate', $("#datepicker-end").val());
            });

            $('input[name="status"]').click(function () {
                $('#form').submit();
            })
        });
    </script>

</#assign>


<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        首页
        <small>一切从这里开始</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="/"><i class="fa fa-home"></i> 管理后台</a></li>
        <li class="active"> 控制台</li>
    </ol>
</section>

<!-- Main content -->

    <section class="content">
      <!-- Info boxes -->
      <div class="row">
        <div class="col-md-2 col-sm-2 col-xs-2">
          <div class="info-box" style="min-height:45px;">
            <span class="info-box-icon bg-aqua" style="width:10px;height:55px;"></span>

            <div class="info-box-content" style="margin-left:5px;">
              <span class="info-box-text">交易总额</span>
              <span class="info-box-number">${(totalOrderAmount?string("0.00"))!}</span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
          <div class="col-md-2 col-sm-2 col-xs-2">
              <div class="info-box" style="min-height:45px;">
                  <span class="info-box-icon bg-red" style="width:10px;height:55px;"></span>

                  <div class="info-box-content" style="margin-left:5px;">
                      <span class="info-box-text">分站总余额</span>
                      <span class="info-box-number">${(agentBalance?string('0.00'))!}</span>
                  </div>
                  <!-- /.info-box-content -->
              </div>
              <!-- /.info-box -->
          </div>
        <!-- /.col -->

        <!-- fix for small devices only -->
        <div class="clearfix visible-sm-block"></div>

       <div class="col-md-2 col-sm-2 col-xs-2">
              <div class="info-box" style="min-height:45px;">
                  <span class="info-box-icon bg-green" style="width:10px;height:55px;"></span>

                  <div class="info-box-content" style="margin-left:5px;">
                      <span class="info-box-text">师傅总余额</span>
                      <span class="info-box-number">${(masterBalance?string('0.00'))!}</span>
                  </div>
                  <!-- /.info-box-content -->
              </div>
              <!-- /.info-box -->
          </div>

        <!-- /.col -->
          <div class="col-md-2 col-sm-2 col-xs-2">
              <div class="info-box" style="min-height:45px;">
                  <span class="info-box-icon bg-gray" style="width:10px;height:55px;"></span>

                  <div class="info-box-content" style="margin-left:5px;">
                      <span class="info-box-text">用户总余额</span>
                      <span class="info-box-number">${(userBalance?string('0.00'))!}</span>
                  </div>
                  <!-- /.info-box-content -->
              </div>
              <!-- /.info-box -->
          </div>
        <!-- /.col -->
           <!-- /.col -->
          <div class="col-md-2 col-sm-2 col-xs-2">
              <div class="info-box" style="min-height:45px;">
                  <span class="info-box-icon bg-maroon" style="width:10px;height:55px;"></span>

                  <div class="info-box-content" style="margin-left:5px;">
                      <span class="info-box-text">未入账</span>
                      <span class="info-box-number">${(totalUnInAmount?string('0.00'))!}</span>
                  </div>
                  <!-- /.info-box-content -->
              </div>
              <!-- /.info-box -->
          </div>
        <!-- /.col -->

         <!-- /.col -->
          <div class="col-md-2 col-sm-2 col-xs-2">
              <div class="info-box" style="min-height:45px;">
                  <span class="info-box-icon bg-yellow" style="width:10px;height:55px;"></span>

                  <div class="info-box-content" style="margin-left:5px;">
                      <span class="info-box-text">合作商家</span>
                      <span class="info-box-number">${partnerCount!}</span>
                  </div>
                  <!-- /.info-box-content -->
              </div>
              <!-- /.info-box -->
          </div>
      </div>
        <!-- /.col -->
          <!-- /.row -->
          <div class="row">
              <div class="col-md-2 col-sm-2 col-xs-2">
                  <div class="info-box" style="min-height:45px;">
                      <span class="info-box-icon bg-aqua" style="width:10px;height:55px;"></span>

                      <div class="info-box-content" style="margin-left:5px;">
                          <span class="info-box-text">用户总数</span>
                          <span class="info-box-number">${userCount!}</span>
                      </div>
                      <!-- /.info-box-content -->
                  </div>
                  <!-- /.info-box -->
              </div>
              <!-- /.col -->
              <div class="col-md-2 col-sm-2 col-xs-2">
                  <div class="info-box" style="min-height:45px;">
                      <span class="info-box-icon bg-red" style="width:10px;height:55px;"></span>

                      <div class="info-box-content" style="margin-left:5px;">
                          <span class="info-box-text">开通分站</span>
                          <span class="info-box-number">${openAgentCount!}</span>
                      </div>
                      <!-- /.info-box-content -->
                  </div>
                  <!-- /.info-box -->
              </div>
              <!-- /.col -->
              <!-- /.row -->
          </div>
      <!-- /.row -->

        <div class="row">
            <div class="col-md-4">
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">今日订单数据</h3>
                        <div class="box-tools pull-right">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="layout-skins-list" class="table table-striped bring-up nth-2-center">
                            <thead>
                            <tr>
                                <th style="width: 50%;"></th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td><code>总有效订单</code></td>
                                <td>${todayTotalOrderCount !}</td>
                            </tr>
                            <tr>
                                <td><code>跑腿有效订单</code></td>
                                <td>${todayPTOrderCount !}</td>
                            </tr>
                            <tr>
                                <td><code>服务有效订单</code></td>
                                <td>${todayOtherOrderCount !}</td>
                            </tr>
                            <tr>
                                <td><code>营业额</code></td>
                                <td>${(todayOrderAmount?string('0.00'))!}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <div class="box box-warning">
                    <div class="box-header with-border">
                        <h3 class="box-title">昨日订单数据</h3>
                        <div class="box-tools pull-right">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="layout-skins-list" class="table table-striped bring-up nth-2-center">
                            <thead>
                                <tr>
                                    <th style="width: 50%;"></th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><code>总有效订单</code></td>
                                    <td>${yesterdayTotalOrderCount !}</td>
                                </tr>
                                <tr>
                                    <td><code>跑腿有效订单</code></td>
                                    <td>${yesterdayPTOrderCount !}</td>
                                </tr>
                                <tr>
                                    <td><code>服务有效订单</code></td>
                                    <td>${yesterdayOtherOrderCount !}</td>
                                </tr>
                                <tr>
                                    <td><code>营业额</code></td>
                                    <td>${(yesterdayOrderAmount?string('0.00')) !}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">待处理事务</h3>
                        <div class="box-tools pull-right">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="layout-skins-list" class="table table-striped bring-up nth-2-center">
                            <thead>
                            <tr>
                                <th style="width: 50%;"></th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td><code>分站待提现</code></td>
                                <td><code>${agentDrawApplayCount !}</code></td>
                            </tr>
                            <tr>
                                <td><code>师傅待提现</code></td>
                                <td><code>${masterDrawApplayCount !}</code></td>
                            </tr>
                            <tr>
                                <td><code>待处理投诉</code></td>
                                <td><code>${unDealComplain !}</code></td>
                            </tr>
                            <tr>
                                <td><code>用户待提现</code></td>
                                <td><code>${userDrawApplayCount !}</code></td>
                            </tr>
                            <tr>
                                <td><code>用户反馈</code></td>
                                <td><code>${unDealFeedback !}</code></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <iframe src="/agent/agentOrderInner?startTime=${startTime!}&endTime=${endTime!}" style="width: 100%;height: 1350px" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
            </div>
        </div>
        <!-- /.col -->
<#--      </div>-->
      <!-- /.row -->
    </section>
    <!-- /.content -->



<!-- /.content -->
</@layout>